<template>
  <div>
    <div>
        <router-link to="/index">Home</router-link>
    </div>
    <div>
        <router-view></router-view>
        <Counter></Counter>
        <div class="button">
            <button @click="changeVuex()">改变我吧</button>
        </div>
    </div>
  </div>
  
</template>

<script>
import Counter from './components/Counter.vue'
export default{
    data: function(){
        return {
            page: 'index'
        }
    },
    components: {
        Counter
    },
    methods:{
        changeVuex: function(){
            this.$store.commit('increment');
        }
    }
}
</script>
